﻿<%@ Page Language="C#" MasterPageFile="~/Manager.master" AutoEventWireup="true" CodeFile="Customer.aspx.cs"
    Inherits="Manager_User_Customer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table width="100%" cellpadding="2" cellspacing="0">
        <tr>
            <td align="left">
                <table border="1" bordercolor="#407db3" cellpadding="2" cellspacing="2" class="tbl_Comon-Search"
                    style="border-collapse: collapse; margin-left: 0px; width: 100%;" width="100%">
                    <tr>
                        <td align="center" nowrap="nowrap" rowspan="2" style="width: 87px" valign="middle">
                            <asp:Button ID="btnSearch" runat="server" CssClass="cssButton" Text="Tìm kiếm" Width="80px"
                                OnClick="btnSearch_Click" /></td>
                        <td nowrap="nowrap" rowspan="1" style="width: 109px" class="td_Title">
                            <asp:Label ID="Label1" runat="server" CssClass="lbl_Common-Search" Text="Họ tên"></asp:Label></td>
                        <td nowrap="nowrap" rowspan="1" class="td_Control">
                            <asp:TextBox ID="txtName" runat="server" Height="20px" Width="98%"></asp:TextBox></td>
                        <td nowrap="nowrap" class="td_Title" style="width: 80px">
                            <asp:Label ID="Label2" runat="server" CssClass="lbl_Common-Search" Text="Điện thoại"></asp:Label></td>
                        <td nowrap="nowrap" class="td_Control" style="width: 102px">
                            <asp:TextBox ID="txtPhone" runat="server"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td class="td_Title" nowrap="nowrap" rowspan="1" style="width: 109px">
                            <asp:Label ID="Label3" runat="server" CssClass="lbl_Common-Search" Text="Tên đăng nhập"></asp:Label></td>
                        <td class="td_Control" nowrap="nowrap" rowspan="1">
                            <asp:TextBox ID="txtLogin" runat="server" Height="20px" Width="98%"></asp:TextBox></td>
                        <td class="td_Title" nowrap="nowrap" style="width: 80px">
                            <asp:Label ID="Label4" runat="server" CssClass="lbl_Common-Search" Text="Email"></asp:Label></td>
                        <td class="td_Control" nowrap="nowrap">
                            <asp:TextBox ID="txtEmail" runat="server" Height="20px" Width="97%"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td align="right" colspan="5" nowrap="nowrap" valign="top">
                            <asp:DropDownList ID="ddlAut" runat="server" Visible="False" AutoPostBack="True" OnSelectedIndexChanged="ddlAut_SelectedIndexChanged">
                            </asp:DropDownList>&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="btnAdd" runat="server" CssClass="cssButton" OnClick="btnAdd_Click1"
                                Text="Tạo mới" /></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <asp:GridView ID="grv_Master" runat="server" CellPadding="2" BorderColor="#407DB3"
                    BorderWidth="1px" AutoGenerateColumns="False" Width="100%" AllowPaging="True"
                    DataKeyNames="UserID" PageSize="20" OnRowDataBound="Grv_Product_RowDataBound"
                    OnRowCreated="grv_Master_RowCreated1" OnRowDeleting="grv_Master_RowDeleting1"
                    OnPageIndexChanging="grv_Master_PageIndexChanging">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <img src='../../Images/Icon/cmdEdit.gif' border="0" alt="Edit" style="cursor: pointer"
                                    onclick='hrUpdateCatalogue(this,<%# Eval("UserID") %>)' />
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Center" Width="10px" />
                            <HeaderStyle CssClass="cssBorderGrv" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:LinkButton ID="lblDelete" runat="server" CommandName="delete" Text="<img src=../../Images/Icon/cmdDelete.gif border=0 alt=Delete > "></asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Center" Width="10px" />
                            <HeaderStyle CssClass="cssBorderGrv" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Họ tên
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("CusNm") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" Width="25%" />
                            <HeaderStyle CssClass="cssBorderGrv"  Wrap="false"/>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Tên đăng nhập
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label55" runat="server" Text='<%# Eval("UserNm") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" Width="10%" />
                            <HeaderStyle CssClass="cssBorderGrv" Wrap="false" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Mật khẩu
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label554222" runat="server" Text='<%# Eval("Password") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" Width="25%" />
                            <HeaderStyle CssClass="cssBorderGrv" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Email
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label554" runat="server" Text='<%# Eval("Email") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" Width="25%" />
                            <HeaderStyle CssClass="cssBorderGrv" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Địa chỉ
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label533353" runat="server" Text='<%# Eval("Address") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" Width="25%" />
                            <HeaderStyle CssClass="cssBorderGrv"  Wrap="false"/>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Nơi chốn
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label553" runat="server" Text='<%# Eval("PlaceNm") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" Width="5%" />
                            <HeaderStyle CssClass="cssBorderGrv" Wrap="false" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Điện thoại
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label3435" runat="server" Text='<%# Eval("Phone") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" Wrap="false" />
                            <HeaderStyle CssClass="cssBorderGrv" Width="2%" Wrap="false" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                MS.Thuế
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label5" runat="server" Text='<%# Eval("TaxNo") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" Wrap="false" />
                            <HeaderStyle CssClass="cssBorderGrv" Width="2%" Wrap="false" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                Quyền hạn
                            </HeaderTemplate>
                            <ItemTemplate>
                              
                            </ItemTemplate>
                            <ItemStyle CssClass="cssBorderGrv" Wrap="false" />
                            <HeaderStyle CssClass="cssBorderGrv" Width="2%" Wrap="false" />
                        </asp:TemplateField>
                        
                    </Columns>
                    <RowStyle CssClass="gvRowStyle" />
                    <AlternatingRowStyle CssClass="gvAlternatingRowStyle" />
                    <HeaderStyle CssClass="gvHeader" />
                </asp:GridView>
            </td>
        </tr>
    </table>


  <script language="javascript" type="text/javascript">
  
    function hrUpdateCatalogue(obj,UserID)
    {
        var CodeID='<%= Request.QueryString["CodeID"]%>';
        var Type='<%= Request.QueryString["Type"]%>';
        window.location.href="AddCustomer.aspx?Type="+Type+"&CodeID="+CodeID+"&UserID="+ UserID;
    }
    
    </script>

</asp:Content>
